--Armor upgrade attemped by wook, this is probably gonna epic fail, soo.
-- thanks to pref for all the help :3
-- I had to change this twice now :O
--NOOOOO!
UpgradeAdd("Armor", "UpgradeArmor", [[Grab Some Armor!!]], 0, UpgradeArmor)

function UpgradeArmor(ply, target, isteam)
	if isteam == "true" then
		for k,v in pairs(player.GetAll()) do
			if v:Team() >= 10 and v:Team() < 19 and ply:Team() >= 10 and ply:Team() < 19 then 

				if credits.Spend(v, 80) then
					Notify(v, "Hey look, you got armor!", 5)
					
					PrevArmor = v:Armor()
					
					v:SetArmor(PrevArmor + 450)
					v:SetNWBool("UPGRADE.ARMOR", true)
				else
					Notify(ply, "You poor fool, not enough money!", 5)
				end	
			end	
		end
	elseif isteam == "false" then
		for k,v in pairs(player.GetAll()) do
			if v:Nick() == tostring(target)then
				p = v
			end
		end
		
		if credits.Spend(p, 90) then
			Notify(p, "Hey look, you got armor!", 5)
			
			PrevArmor = p:Armor()
			
			p:SetArmor(PrevArmor + 450)
			p:SetNWBool("UPGRADE.ARMOR", true)
		else	
			Notify(ply, "You poor fool, not enough money", 5)
		end
	end
end	